//
//  WTUserTest.m
//  UIViewTransformPoint
//
//  Created by codew on 5/17/21.
//

#import "WTUserTest.h"

#import <objc/runtime.h>

@implementation WTUserTest

+ (void)load
{
    Method test = class_getInstanceMethod(self, @selector(test));
    Method test2 = class_getInstanceMethod(self, @selector(test2));
    method_exchangeImplementations(test, test2);
    
    
    Method classtest = class_getClassMethod(self, @selector(test));
    Method classtest2 = class_getClassMethod(self, @selector(test2));
    method_exchangeImplementations(classtest, classtest2);
    
}


// 原来方法
+ (void)test
{
    NSLog(@"类-吃饭了没?........");
}

// 替换方法
+ (void)test2
{
    
   
    [self test2];
    NSLog(@"类-晚上好啊~........");
}



// 源方法
- (void)test
{
    
    NSLog(@"吃饭了没?........");
}

// 替换方法
- (void)test2
{
   
    [self test2];
    NSLog(@"晚上好啊~........");
    
    
}
@end
 
